package com.demo.springbootmongodb.repository;

import com.demo.springbootmongodb.model.User;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.List;

public interface UserRepository extends MongoRepository<User, Long> {

    @Query("{'id': {$lte: ?0}}")
    List<User> withQuery(Long id);
}
